package com.suny.AccountInfo.dto;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serializable;

@Schema(description = "新增人员实体")
@Data
public class AccountInfoAddDTO implements Serializable {
    /**
     * 用户姓名
     */
    @Schema(description = "用户姓名")
    @NotBlank(message = "姓名不能为空")
    @Size(max = 10, message = "姓名最长10个字符")
    private String accName;

    /**
     * 手机号11位
     */
    @Schema(description = "手机号")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @NotBlank(message = "手机号不能为空")
    private String accPhone;
}

